package com.epfresh.supplier.entity;

import android.text.TextUtils;
import android.util.Log;

import com.epfresh.api.global.BaseApplication;
import com.epfresh.api.utils.FormatUtil;
import com.google.gson.Gson;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

public class ProductAddEntity {

    private String modifiedTime;
    private int salesVolume;
    private int creatorId;
    private int modifierId;
    private String number;
    private boolean isDeleted;
    private int merchantId;
    private String createdTime;
    private boolean isProduct;
    private String inventoryAmount;
    private String thumbnail;
    private int productId;
    private String pack;
    private String unit;
    private String barCode;
    private String deposit;
    private boolean purchaseIsSale = true;
    private List<String> banner;
    private List<String> imgList;
    private String productSpecId;

    public String getProductSpecId() {
        return productSpecId;
    }

    public void setProductSpecId(String productSpecId) {
        this.productSpecId = productSpecId;
    }

    private ProductSpecPriceBean productSpecPrice;
    private CategoryiiiBean categoryiii;
    private ProductParseDtoBean productParseDto;
    private String incr;

    public void setIncr(String incr) {
        this.incr = incr;
    }

    public String getBarCode() {
        return barCode;
    }

    public void setBarCode(String barCode) {
        this.barCode = barCode;
    }

    public String getDeposit() {
        return deposit;
    }

    public void setDeposit(String deposit) {
        this.deposit = deposit;
    }

    public String getModifiedTime() {
        return modifiedTime;
    }

    public void setModifiedTime(String modifiedTime) {
        this.modifiedTime = modifiedTime;
    }

    public int getSalesVolume() {
        return salesVolume;
    }

    public void setSalesVolume(int salesVolume) {
        this.salesVolume = salesVolume;
    }

    public int getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(int creatorId) {
        this.creatorId = creatorId;
    }

    public int getModifierId() {
        return modifierId;
    }

    public void setModifierId(int modifierId) {
        this.modifierId = modifierId;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public boolean isDeleted() {
        return isDeleted;
    }

    public void setDeleted(boolean deleted) {
        isDeleted = deleted;
    }

    public int getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(int merchantId) {
        this.merchantId = merchantId;
    }

    public String getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(String createdTime) {
        this.createdTime = createdTime;
    }

    public boolean isProduct() {
        return isProduct;
    }

    public void setProduct(boolean product) {
        isProduct = product;
    }

    public String getInventoryAmount() {
        return inventoryAmount;
    }

    public void setInventoryAmount(String inventoryAmount) {
        this.inventoryAmount = inventoryAmount;
    }

    public String getThumbnail() {
        return thumbnail;
    }

    public void setThumbnail(String thumbnail) {
        this.thumbnail = thumbnail;
    }

    public int getProductId() {
        return productId;
    }

    public void setProductId(int productId) {
        this.productId = productId;
    }

    public String getPack() {
        return pack;
    }

    public void setPack(String pack) {
        this.pack = pack;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public boolean isPurchaseIsSale() {
        return purchaseIsSale;
    }

    public void setPurchaseIsSale(boolean purchaseIsSale) {
        this.purchaseIsSale = purchaseIsSale;
    }

    public int getStoreId() {
        return storeId;
    }

    public void setStoreId(int storeId) {
        this.storeId = storeId;
    }

    public List<String> getBanner() {
        return banner;
    }

    public void setBanner(List<String> banner) {
        this.banner = banner;
    }

    public List<String> getImgList() {
        return imgList;
    }

    //
    public void setImgList(List<String> imgList) {
        this.imgList = imgList;
    }

    public ProductSpecPriceBean getProductSpecPrice() {
        return productSpecPrice;
    }

    public void setProductSpecPrice(ProductSpecPriceBean productSpecPrice) {
        this.productSpecPrice = productSpecPrice;
    }

    public CategoryiiiBean getCategoryiii() {
        return categoryiii;
    }

    public void setCategoryiii(CategoryiiiBean categoryiii) {
        this.categoryiii = categoryiii;
    }

    public ProductParseDtoBean getProductParseDto() {
        return productParseDto;
    }

    public void setProductParseDto(ProductParseDtoBean productParseDto) {
        this.productParseDto = productParseDto;
    }

    /*  "title": "测试商品-supplier app",
            "type": 1,
            "categoryId": 1,
            "nameId": 3,
            "varietyId": 6,
            "levelId": 7,
            "origin": "铜川",
            "brand": "铜果",
            "packageSize": "10",
            "packageUnit": "斤",
            "packageContainer": "箱",
            "pluckingTime": "2016-05-13",
            "deliveryTime": "2016-05-13",
            "description": "测试商品描述",
            "price":"",
            "saleCities":"",
            "paymentMode":"",
            "inventory":"",
            "moq":"",
            "weight": "",*/

    /*saleChannelApp */

    //预计送达时间：deliveryTime 预售截止时间：saleDeadline
    private boolean saleChannelApp = true;//是否线上销售（pos机之外）
    //商品标题
    private String title;

    private String type;

    private String categoryId;
    private String categoryName;
    private String nameId;
    private String varietyId;
    private String levelId;
    private String topCategoryId;
    private String topCategoryName;
    private String categoryType;
    //产地
    private String origin;
    //品牌
    private String brand;
    //包装数量
    private String packageSize;
    //
    private String packageContainer;
    private String packageUnit;
    private String description;

    //采摘时间
    private String pluckingTime;
    //送达时间
    private String deliveryTime;
    //价格
    private float price;

    //单位重量
    private String weight;

    //库存
    private String inventory;
    //销售城市
    private String saleCities;
    //支付方式
    private String paymentMode;

    //起订量
    private String moq;

    private List<Images> images;

    private List<TagEntity> tags;


    private List<PriceSetting> configs;

    private String saleDeadline;
    private String marketingTime;


    private String category;
    private Category name1;
    private String names;
    private String variety;
    private String level;

    private int id;
    private String storeCategoryId;
    private String storeCategoryName;
    private String storeTopCategoryId;
    private String storeTopCategoryName;
    //品名字段
    private String species;
    private int status;

    //结算单位价格
    private String chargeUnit;
    //结算单位json列表
    private transient String priceUnit;
    private transient List<Images> imagesDetail;
    private transient List<Images> imagesBanner;

    private PurchaseInfo purchase;
    //    private Promotion promotion;
    private List<Promotion> promotionList;
    private String ifPromotion;
    private String ifSeckill;

    private Boolean isPlatType;

    int storeId;

    //是否跳过库存校验(true: 跳过)
    private boolean skip;

    private List<Integer> promotionTypes;

    public boolean isSaleChannelApp() {
        return saleChannelApp;
    }

    public Boolean getPlatType() {
        return isPlatType;
    }

    public void setPlatType(Boolean platType) {
        isPlatType = platType;
    }

    public void setSaleChannelApp(boolean saleChannelApp) {
        this.saleChannelApp = saleChannelApp;
    }

    public ProductAddEntity() {
        if (!TextUtils.isEmpty(BaseApplication.getInstance().getStoreId())) {
            storeId = Integer.parseInt(BaseApplication.getInstance().getStoreId());
        }
    }

    //    public Promotion getPromotion() {
//        return promotion;
//    }
//
//    public void setPromotion(Promotion promotion) {
//        this.promotion = promotion;
//    }


    public String getTopCategoryName() {
        return topCategoryName;
    }

    public void setTopCategoryName(String topCategoryName) {
        this.topCategoryName = topCategoryName;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public String getStoreTopCategoryId() {
        return storeTopCategoryId;
    }

    public void setStoreTopCategoryId(String storeTopCategoryId) {
        this.storeTopCategoryId = storeTopCategoryId;
    }

    public String getStoreTopCategoryName() {
        return storeTopCategoryName;
    }

    public void setStoreTopCategoryName(String storeTopCategoryName) {
        this.storeTopCategoryName = storeTopCategoryName;
    }

    public boolean isSkip() {
        return skip;
    }

    public void setSkip(boolean skip) {
        this.skip = skip;
    }

    public List<Integer> getPromotionTypes() {
        return promotionTypes;
    }

    public void setPromotionTypes(List<Integer> promotionTypes) {
        this.promotionTypes = promotionTypes;
    }

    public String getIfSeckill() {
        return ifSeckill;
    }

    public void setIfSeckill(String ifSeckill) {
        this.ifSeckill = ifSeckill;
    }

    public List<Promotion> getPromotionList() {
        return promotionList;
    }

    public void setPromotionList(List<Promotion> promotionList) {
        this.promotionList = promotionList;
    }

    public String getIfPromotion() {
        return ifPromotion;
    }

    public void setIfPromotion(String ifPromotion) {
        this.ifPromotion = ifPromotion;
    }

    public PurchaseInfo getPurchase() {
        return purchase;
    }

    public void setPurchase(PurchaseInfo purchase) {
        this.purchase = purchase;
    }

    public String getCategoryType() {
        return categoryType;
    }

    public void setCategoryType(String categoryType) {
        this.categoryType = categoryType;
    }

    public String getTopCategoryId() {
        return topCategoryId;
    }

    public void setTopCategoryId(String topCategoryId) {
        this.topCategoryId = topCategoryId;
    }

    public String getSpecies() {
        return species;
    }

    public void setSpecies(String species) {
        this.species = species;
    }

    public String getStoreCategoryName() {
        return storeCategoryName;
    }

    public void setStoreCategoryName(String storeCategoryName) {
        this.storeCategoryName = storeCategoryName;
    }

    public String getStoreCategoryId() {
        return storeCategoryId;
    }

    public void setStoreCategoryId(String storeCategoryId) {
        this.storeCategoryId = storeCategoryId;
    }

    public String getChargeUnit() {
        return chargeUnit;
    }

    public void setChargeUnit(String chargeUnit) {
        this.chargeUnit = chargeUnit;
    }

    public String getPriceUnit() {
        return priceUnit;
    }

    public void setPriceUnit(String priceUnit) {
        this.priceUnit = priceUnit;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public Category getName() {
        return name1;
    }

    public void setName(Category name) {
        this.name1 = name;
    }

    public String getNames() {
        return names;
    }

    public void setNames(String names) {
        this.names = names;
    }

    public String getVariety() {
        return variety;
    }

    public void setVariety(String variety) {
        this.variety = variety;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public String getPluckingTime() {
        if (pluckingTime != null && pluckingTime.length() > 10) {
            pluckingTime = pluckingTime.substring(0, 10);
        }
        return pluckingTime;
    }

    public void setPluckingTime(String pluckingTime) {
        this.pluckingTime = pluckingTime;
    }

    public List<PriceSetting> getConfigs() {
        return configs;
    }

    public void setConfigs(List<PriceSetting> configs) {
        this.configs = configs;
    }

    public List<Images> getImages() {
        return images;
    }

    public void setImages(List<Images> images) {
        this.images = images;
    }

    public String getPackageContainer() {
        return packageContainer;
    }

    public void setPackageContainer(String packageContainer) {
        this.packageContainer = packageContainer;
    }

    public String getOrigin() {
        return origin;
    }

    public void setOrigin(String origin) {
        if (origin == null || "".equals(origin.trim())) {
            this.origin = null;
        } else
            this.origin = origin;
    }

    public String getPackageUnit() {
        return packageUnit;
    }

    public void setPackageUnit(String packageUnit) {
        this.packageUnit = packageUnit;
    }

    public String getDescription() {
        return description == null ? "" : description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getPackageSize() {
        return packageSize;
    }

    public void setPackageSize(String packageSize) {
        this.packageSize = packageSize;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public List<TagEntity> getTags() {
        return tags;
    }

    public void setTags(List<TagEntity> tags) {
        this.tags = tags;
    }

    public String getSaleDeadline() {
        return saleDeadline;
    }

    public void setSaleDeadline(String saleDeadline) {
        this.saleDeadline = saleDeadline;
    }

    public String getMarketingTime() {
        return marketingTime;
    }

    public void setMarketingTime(String marketingTime) {
        this.marketingTime = marketingTime;
    }

    public String getVarietyId() {
        return varietyId;
    }

    public void setVarietyId(String varietyId) {
        if (varietyId == null || "".equals(varietyId)) {
            this.varietyId = null;
        } else {
            this.varietyId = varietyId;
        }
    }

    public String getLevelId() {
        return levelId;
    }

    public void setLevelId(String levelId) {
        if (levelId == null || "".equals(levelId)) {
            this.levelId = null;
        } else {
            this.levelId = levelId;
        }
    }

    public String getNameId() {
        return nameId;
    }

    public void setNameId(String nameId) {
        if (nameId == null || "".equals(nameId)) {
            this.nameId = null;
        } else {
            this.nameId = nameId;
        }

    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        if (brand == null || "".equals(brand.trim())) {
            this.brand = null;
        } else
            this.brand = brand;
    }

    public String getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(String categoryId) {
        if (categoryId == null || "".equals(categoryId)) {
            this.categoryId = null;
        } else {
            this.categoryId = categoryId;
        }
    }


    public String getDeliveryTime() {
        if (deliveryTime != null && deliveryTime.length() > 10) {
            deliveryTime = deliveryTime.substring(0, 10);
        }
        return deliveryTime;
    }

    public void setDeliveryTime(String deliveryTime) {
        this.deliveryTime = deliveryTime;
    }

    public float getPrice() {
        return price;
    }

    public void setPrice(float price) {
        this.price = price;
    }

    public String getWeight() {
        return weight;
    }

    public void setWeight(String weight) {
        this.weight = weight;
    }

    public String getInventory() {
        return inventory;
    }

    public void setInventory(String inventory) {
        this.inventory = inventory;
    }

    public String getSaleCities() {
        return saleCities;
    }

    public void setSaleCities(String saleCities) {
        this.saleCities = saleCities;
    }

    public String getPaymentMode() {
        return paymentMode;
    }

    public void setPaymentMode(String paymentMode) {
        this.paymentMode = paymentMode;
    }

    public List<Images> getImagesDetail() {
        return imagesDetail;
    }

    public String getPackageStr() {

        if (packageSize == null || "".equals(packageSize)) {
            return null;
        }
        if (
                "公斤".equals(packageUnit)
                        || "斤".equals(packageUnit)
                        || "千克".equals(packageUnit)
                        || "克".equals(packageUnit)
                        || "两".equals(packageUnit)
                        || "吨".equals(packageUnit)
                        || "毫克".equals(packageUnit)

                ) {

            return packageSize + packageUnit + "/" + packageContainer;
        }
        return packageSize + packageUnit + "/" + packageContainer /*+ "-" + weight + "公斤/" + packageContainer*/;
    }

    public String getPackageUnitStr() {

        if (packageSize == null || "".equals(packageSize)) {
            return null;
        }
        if (
                "公斤".equals(packageUnit)
                        || "斤".equals(packageUnit)
                        || "千克".equals(packageUnit)
                        || "克".equals(packageUnit)
                        || "两".equals(packageUnit)
                        || "吨".equals(packageUnit)
                        || "毫克".equals(packageUnit)

                ) {

            return packageUnit + "/" + packageContainer;
        }
        return packageUnit + "/" + packageContainer /*+ "-" + weight + "公斤/" + packageContainer*/;
    }

    public void setImagesDetail(List<Images> imagesDetail) {
        if (this.imagesDetail != null) {
            this.imagesDetail.clear();
            if (imagesDetail != null)
                this.imagesDetail.addAll(imagesDetail);
        } else {
            this.imagesDetail = imagesDetail;
        }
    }

    public List<Images> getImagesBanner() {
        return imagesBanner;
    }

    public void setImagesBanner(List<Images> imagesBanner) {
        if (this.imagesBanner != null) {
            this.imagesBanner.clear();
            this.imagesBanner.addAll(imagesBanner);
        } else {
            this.imagesBanner = imagesBanner;
        }
    }

    public void reSortImages() {
        if (images == null) {
            images = new ArrayList<>();
        } else
            images.clear();
        if (imagesBanner != null) {
            images.addAll(0, imagesBanner);
        }

        if (imagesDetail != null) {
            images.addAll(imagesDetail);
        }
    }

    public void buildImages() {

        if (images != null) {
            if (imagesBanner == null) {
                imagesBanner = new ArrayList<>();
            } else {
                imagesBanner.clear();
            }

            if (imagesDetail == null) {
                imagesDetail = new ArrayList<>();
            } else {
                imagesDetail.clear();
            }
            for (int i = 0; i < images.size(); i++) {
                Images image = this.images.get(i);
                if (image.isBanner() && imagesBanner.size() < 3) {
                    imagesBanner.add(image);
                } else if (!image.isBanner() && imagesDetail.size() < 6) {
                    imagesDetail.add(image);
                }
            }
        }
    }

    public String getMoq() {
        return moq;
    }

    public void setMoq(String moq) {
        this.moq = moq;
        if (productSpecPrice != null) {
            productSpecPrice.setMoq(moq);
        }
    }


    public String getUnitStr() {
        return chargeUnit;
    }

    public String getUnitPriceStr() {

        return packageUnit == null ? "元" : "元/" + chargeUnit;

    }

    public void setPromotion(Promotion p) {
        if (p != null) {
            if (promotionList == null) {
                promotionList = new ArrayList<>();
                promotionList.add(p);
            } else {
                for (int i = 0; i < promotionList.size(); i++) {
                    Promotion promotion = promotionList.get(i);
                    if (p.getType() != null && !"".equals(p.getType()) && promotion.getType() != null && !"".equals(promotion.getType()) && p.getType().equals(promotion.getType())) {
                        promotion.cloneData(p);
                    }
                }
            }


        }
    }

    public Promotion getPromotion() {


        if (promotionList != null) {
            for (int i = 0; i < promotionList.size(); i++) {
                Promotion promotion = promotionList.get(i);
                if ("1".equals(promotion.getType())) {
                    return promotion;
                }
            }
        }


        return null;
    }

    public Promotion getSecKill() {


        if (promotionList != null) {
            for (int i = 0; i < promotionList.size(); i++) {
                Promotion promotion = promotionList.get(i);
                if ("2".equals(promotion.getType())) {
                    return promotion;
                }
            }
        }


        return null;
    }

    public double getIncr() {
        try {


            Log.e("chargeUnit", "----" + chargeUnit);
//            if ("散货".equals(packageContainer)) {
//                return 1;
//            } else {
            if (packageContainer != null && packageContainer.equals(chargeUnit)) {
                return 1;
            } else if (packageUnit != null && packageUnit.equals(chargeUnit)) {
                if (packageSize != null && !"".equals(packageSize)) {
                    return Double.valueOf(packageSize);
                }
            } else {
                if (weight != null && !"".equals(weight)) {
                    double f = Double.valueOf(weight);
                    return f;
                }
            }
//            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return 1;
    }

    public boolean hasPurchaseInfo() {
        if (purchase != null && !purchase.isQuantityEmpty()) {
            return true;
        }
        return false;
    }

    public void init() {
        if (name1 != null) {
            this.names = name1.getName();
        }
        buildImages();
    }

    public String getPriceUnitStr() {
        List<String> priceUnit = new ArrayList<>();

        if ("散货".equals(packageContainer)) {


            if ("公斤".equals(packageUnit)
                    || "千克".equals(packageUnit) ||
                    "斤".equals(packageUnit) ||
                    "吨".equals(packageUnit) ||
                    "克".equals(packageUnit)) {

                priceUnit.add(packageUnit);

            } else {
                priceUnit.add(packageUnit);
                priceUnit.add("公斤");

            }


        } else {
//            chargeUnit = packageContainer;

            if ("公斤".equals(packageUnit) || "千克".equals(packageUnit) || "斤".equals(packageUnit) || "吨".equals(packageUnit) || "克".equals(packageUnit)) {

                priceUnit.add(packageContainer);
                priceUnit.add(packageUnit);
            } else {

                priceUnit.add(packageUnit);
                priceUnit.add(packageContainer);
                priceUnit.add("公斤");
            }

        }

        return new Gson().toJson(priceUnit);
    }

    public void initWeight() {


        if ("公斤".equals(packageUnit)
                || "千克".equals(packageUnit) ||
                "斤".equals(packageUnit) ||
                "吨".equals(packageUnit) ||
                "克".equals(packageUnit)) {


            double f = FormatUtil.getDouble(String.valueOf(packageSize));
            if ("斤".equals(packageUnit)) {

                BigDecimal amt = new BigDecimal(f).setScale(2, BigDecimal.ROUND_HALF_UP);
                BigDecimal divisor = new BigDecimal(2).setScale(2, BigDecimal.ROUND_HALF_UP);
                BigDecimal add = amt.divide(divisor, 3, BigDecimal.ROUND_HALF_UP).setScale(3, BigDecimal.ROUND_HALF_UP);

                f = add.doubleValue();
            } else if ("吨".equals(packageUnit)) {
                f = f * 1000;
            } else if ("克".equals(packageUnit)) {


                BigDecimal amt = new BigDecimal(f).setScale(2, BigDecimal.ROUND_HALF_UP);
                BigDecimal divisor = new BigDecimal(1000).setScale(2, BigDecimal.ROUND_HALF_UP);
                BigDecimal add = amt.divide(divisor, 3, BigDecimal.ROUND_HALF_UP).setScale(3, BigDecimal.ROUND_HALF_UP);
                f = add.doubleValue();
            }

            weight = String.valueOf(f);
        }


    }

    @Override
    public String toString() {
        return "ProductAddEntity{" +
                "title='" + title + '\'' +
                ", type='" + type + '\'' +
                ", categoryId='" + categoryId + '\'' +
                ", nameId='" + nameId + '\'' +
                ", varietyId='" + varietyId + '\'' +
                ", levelId='" + levelId + '\'' +
                ", topCategoryId='" + topCategoryId + '\'' +
                ", categoryType='" + categoryType + '\'' +
                ", origin='" + origin + '\'' +
                ", brand='" + brand + '\'' +
                ", packageSize='" + packageSize + '\'' +
                ", packageContainer='" + packageContainer + '\'' +
                ", packageUnit='" + packageUnit + '\'' +
                ", description='" + description + '\'' +
                ", pluckingTime='" + pluckingTime + '\'' +
                ", deliveryTime='" + deliveryTime + '\'' +
                ", price='" + price + '\'' +
                ", weight='" + weight + '\'' +
                ", inventory='" + inventory + '\'' +
                ", saleCities='" + saleCities + '\'' +
                ", paymentMode='" + paymentMode + '\'' +
                ", moq='" + moq + '\'' +
                ", images=" + images +
                ", tags=" + tags +
                ", configs=" + configs +
                ", saleDeadline='" + saleDeadline + '\'' +
                ", marketingTime='" + marketingTime + '\'' +
                ", category='" + category + '\'' +
                ", name=" + name1 +
                ", names='" + names + '\'' +
                ", variety='" + variety + '\'' +
                ", level='" + level + '\'' +
                ", id='" + id + '\'' +
                ", storeCategoryId='" + storeCategoryId + '\'' +
                ", storeCategoryName='" + storeCategoryName + '\'' +
                ", species='" + species + '\'' +
                ", status=" + status +
                ", chargeUnit='" + chargeUnit + '\'' +
                ", priceUnit='" + priceUnit + '\'' +
                ", imagesDetail=" + imagesDetail +
                ", imagesBanner=" + imagesBanner +
                '}';
    }

    public static class ProductSpecPriceBean {
        private String modifiedTime;
        private int productId;
        private int groupId;
        private int creatorId;
        private int modifierId;
        private String moq;
        private float price;
        private int productSpecId;
        private String createdTime;
        private int id;
        private boolean salesStatus;

        public String getModifiedTime() {
            return modifiedTime;
        }

        public void setModifiedTime(String modifiedTime) {
            this.modifiedTime = modifiedTime;
        }

        public int getProductId() {
            return productId;
        }

        public void setProductId(int productId) {
            this.productId = productId;
        }

        public int getGroupId() {
            return groupId;
        }

        public void setGroupId(int groupId) {
            this.groupId = groupId;
        }

        public int getCreatorId() {
            return creatorId;
        }

        public void setCreatorId(int creatorId) {
            this.creatorId = creatorId;
        }

        public int getModifierId() {
            return modifierId;
        }

        public void setModifierId(int modifierId) {
            this.modifierId = modifierId;
        }

        public String getMoq() {
            return moq;
        }

        public void setMoq(String moq) {
            this.moq = moq;
        }

        public float getPrice() {
            return price;
        }

        public void setPrice(float price) {
            this.price = price;
        }

        public int getProductSpecId() {
            return productSpecId;
        }

        public void setProductSpecId(int productSpecId) {
            this.productSpecId = productSpecId;
        }

        public String getCreatedTime() {
            return createdTime;
        }

        public void setCreatedTime(String createdTime) {
            this.createdTime = createdTime;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public boolean isSalesStatus() {
            return salesStatus;
        }

        public void setSalesStatus(boolean salesStatus) {
            this.salesStatus = salesStatus;
        }
    }

    public static class CategoryiiiBean {

        private int iconId;
        private String code;
        private int sort;
        private int oldId;
        private boolean enabled;
        private int parentId;
        private int depth;
        private boolean deleted;
        private String name;
        private boolean halal;
        private boolean canPublishProduct;
        private String alias;
        private int id;
        private String iconUrl;

        public int getIconId() {
            return iconId;
        }

        public void setIconId(int iconId) {
            this.iconId = iconId;
        }

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public int getSort() {
            return sort;
        }

        public void setSort(int sort) {
            this.sort = sort;
        }

        public int getOldId() {
            return oldId;
        }

        public void setOldId(int oldId) {
            this.oldId = oldId;
        }

        public boolean isEnabled() {
            return enabled;
        }

        public void setEnabled(boolean enabled) {
            this.enabled = enabled;
        }

        public int getParentId() {
            return parentId;
        }

        public void setParentId(int parentId) {
            this.parentId = parentId;
        }

        public int getDepth() {
            return depth;
        }

        public void setDepth(int depth) {
            this.depth = depth;
        }

        public boolean isDeleted() {
            return deleted;
        }

        public void setDeleted(boolean deleted) {
            this.deleted = deleted;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public boolean isHalal() {
            return halal;
        }

        public void setHalal(boolean halal) {
            this.halal = halal;
        }

        public boolean isCanPublishProduct() {
            return canPublishProduct;
        }

        public void setCanPublishProduct(boolean canPublishProduct) {
            this.canPublishProduct = canPublishProduct;
        }

        public String getAlias() {
            return alias;
        }

        public void setAlias(String alias) {
            this.alias = alias;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getIconUrl() {
            return iconUrl;
        }

        public void setIconUrl(String iconUrl) {
            this.iconUrl = iconUrl;
        }
    }

    public static class ProductParseDtoBean {

        private long modifiedTime;
        private boolean shareInventory;
        private String categoryiiName;
        private int categoryiiId;
        private String description;
        private int storeId;
        private String title;
        private int type;
        private boolean isShareInventory;
        private int categoryiId;
        private String number;
        private String categoryiiiName;
        private int merchantId;
        private String categoryiName;
        private long createdTime;
        private int id;
        private int categoryiiiId;
        private int auditStatus;
        private boolean halal;

        public boolean isHalal() {
            return halal;
        }

        public void setHalal(boolean halal) {
            this.halal = halal;
        }

        public int getAuditStatus() {
            return auditStatus;
        }

        public void setAuditStatus(int auditStatus) {
            this.auditStatus = auditStatus;
        }

        public long getModifiedTime() {
            return modifiedTime;
        }

        public void setModifiedTime(long modifiedTime) {
            this.modifiedTime = modifiedTime;
        }

        public boolean isShareInventory() {
            return shareInventory;
        }

        public void setShareInventory(boolean shareInventory) {
            this.shareInventory = shareInventory;
        }

        public String getCategoryiiName() {
            return categoryiiName;
        }

        public void setCategoryiiName(String categoryiiName) {
            this.categoryiiName = categoryiiName;
        }

        public int getCategoryiiId() {
            return categoryiiId;
        }

        public void setCategoryiiId(int categoryiiId) {
            this.categoryiiId = categoryiiId;
        }

        public String getDescription() {
            return description;
        }

        public void setDescription(String description) {
            this.description = description;
        }

        public int getStoreId() {
            return storeId;
        }

        public void setStoreId(int storeId) {
            this.storeId = storeId;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        public boolean isIsShareInventory() {
            return isShareInventory;
        }

        public void setIsShareInventory(boolean isShareInventory) {
            this.isShareInventory = isShareInventory;
        }

        public int getCategoryiId() {
            return categoryiId;
        }

        public void setCategoryiId(int categoryiId) {
            this.categoryiId = categoryiId;
        }

        public String getNumber() {
            return number;
        }

        public void setNumber(String number) {
            this.number = number;
        }

        public String getCategoryiiiName() {
            return categoryiiiName;
        }

        public void setCategoryiiiName(String categoryiiiName) {
            this.categoryiiiName = categoryiiiName;
        }

        public int getMerchantId() {
            return merchantId;
        }

        public void setMerchantId(int merchantId) {
            this.merchantId = merchantId;
        }

        public String getCategoryiName() {
            return categoryiName;
        }

        public void setCategoryiName(String categoryiName) {
            this.categoryiName = categoryiName;
        }

        public long getCreatedTime() {
            return createdTime;
        }

        public void setCreatedTime(long createdTime) {
            this.createdTime = createdTime;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public int getCategoryiiiId() {
            return categoryiiiId;
        }

        public void setCategoryiiiId(int categoryiiiId) {
            this.categoryiiiId = categoryiiiId;
        }
    }
}
